import request from '@/utils/request'

export function getAllCarousel() {
    return request({
        url: `/carousel/all`,
        method: 'get'
    })
}

export function fetchSingleCarousel(carouselId) {
    return request({
        url: `/carousel/${carouselId}`,
        method: 'get'
    })
}


export function uploadCarousel(data) {
    return request({
        url:'/carousel/save',
        method:'post',
        contentType:'application/json',
        data
    })
}

export function updateCarousel(data) {
    return request({
        url:'/carousel/update',
        method:'post',
        dataType:'json',
        data
    })
}


export function deleteCarousel(carouselId){
    return request({
        url: `/carousel/delete/${carouselId}`,
        method:'delete'
    })
}

export function getPath(data){
    return request({
        url: `/transfer/upload`,
        method:'post',
        contentType:'multipart/form-data',
        data
    })
}
